﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using kwzx.Utils;
using Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Text.RegularExpressions;
using System.IO;
using System.Data.OleDb;
using System.Threading;

namespace kwzx.ImpExcel
{
    public partial class user2impExcel : Form
    {
        DataSet1TableAdapters.T_USERTableAdapter useradp = new DataSet1TableAdapters.T_USERTableAdapter();
        DataSet1TableAdapters.T_USER2TableAdapter user2adp = new DataSet1TableAdapters.T_USER2TableAdapter();
        DataSet1TableAdapters.T_GROUPTableAdapter groupadp = new DataSet1TableAdapters.T_GROUPTableAdapter();
        DataSet1TableAdapters.T_BMTableAdapter bmadp = new DataSet1TableAdapters.T_BMTableAdapter();
        DataSet1TableAdapters.X_CS_DETAILTableAdapter detailadp = new DataSet1TableAdapters.X_CS_DETAILTableAdapter();
        DataSet1TableAdapters.CD_UserTypeTableAdapter usertypeadp = new DataSet1TableAdapters.CD_UserTypeTableAdapter();

        Utils.CommonData commdata = new CommonData();
        string pathName = System.Windows.Forms.Application.StartupPath + "/zp/";
        string pathFileName = "";

        int gsdwid = -2;//公司ID
        int gsbmid = -2;//归属部门ID
        int rylbid = -2;//人员ID
        int gwgzid = -2;//工种ID
        int gsdeptid = -2;//公司对应的部门ID
        string zp = "";//照片存放路径
        string gsdw = "";//公司单位全称
        string tempbz = "数据不正确";//数据验证标识
        string _user2impExcel = "";

        public user2impExcel(string user2impExcel)
        {
            _user2impExcel = user2impExcel;
            InitializeComponent();
        }

        /// <summary>
        /// 选择照片存放路径，默认的路径为当前程序下的images里面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            if (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                this.label4.Text = "照片选择路径为：";
                this.textBox2.Text = this.folderBrowserDialog1.SelectedPath;
            }
            else
            {
                this.label4.Text = "照片默认存放路径为：";
                this.textBox2.Text = System.Windows.Forms.Application.StartupPath + "/zp/";
            }
        }

        /// <summary>
        /// 设置照片存放路径为当前程序下的images文件夹
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            this.label4.Text = "照片默认存放路径为：";
            this.textBox2.Text = System.Windows.Forms.Application.StartupPath + "/zp/";
        }

        private void user2impExcel_Load(object sender, EventArgs e)
        {
            //当照片存放路径为空时，默认的路径为当前程序下的images文件夹
            this.textBox2.Text = System.Windows.Forms.Application.StartupPath + "/zp/";
            this.textBox1.Text = System.Windows.Forms.Application.StartupPath + "/zp/非正式员工Excel模版.xls";
            this.FormBorderStyle = FormBorderStyle.FixedSingle;//不允许拉申窗口大小
            this.MaximizeBox = false;//不允许最大化

            //判断是否显示“检验人员和照片是否对应”按钮
            if ((this.textBox1.Text.Trim() != "") || (this.textBox2.Text.Trim() != ""))
            {
                this.button4.Enabled = true;
            }
        }

        private void ThreadTask()
        {
            int newval;
            string FileName = this.openFileDialog1.FileName;
            this.textBox1.Text = FileName;

            //循环Excel文件，去照片目录下读取照片信息。要是成功匹配，修改Excel第21列数据。不成功提示。
            //加载Excel文件到DataTable中
            System.Data.DataTable tb = JZExcelFile();

            if (tb != null)
            {
                string filePath = textBox1.Text;
                Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
                app.Visible = false;

                //打开Exce
                Workbook w = (Workbook)app.Workbooks.Open(filePath, Missing.Value, Missing.Value, Missing.Value,
                     Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
                     Missing.Value, Missing.Value, Missing.Value, Missing.Value);

                Microsoft.Office.Interop.Excel._Worksheet xSt = (Microsoft.Office.Interop.Excel._Worksheet)w.Worksheets[1];

                try
                {
                    for (int i = 0; i < tb.Rows.Count; i++)
                    {
                        this.progressBar1.Maximum = tb.Rows.Count;
                        newval = this.progressBar1.Value + tb.Rows.Count;

                        if (newval > this.progressBar1.Maximum)
                            newval = this.progressBar1.Maximum;
                        else if (newval < this.progressBar1.Minimum)
                            newval = this.progressBar1.Minimum;

                        this.progressBar1.Value = newval;

                        int j = i;//用来标识Excel中和记录是第几条
                        int xfzt = 0;
                        tempbz = "数据不正确";//数据验证标识

                        //必填数据
                        string yggh = tb.Rows[i]["员工工号"].ToString();
                        string xm = Regex.Replace(tb.Rows[i]["姓名"].ToString(), @"\s", "");
                        string xb = Regex.Replace(tb.Rows[i]["性别"].ToString(), @"\s", "");
                        string sfzhm = Convert.ToString(Regex.Replace(tb.Rows[i]["身份证号码"].ToString(), @"\s", ""));
                        string gsdwqc = Regex.Replace(tb.Rows[i]["公司单位全称"].ToString(), @"\s", "");
                        string gsbm = Regex.Replace(tb.Rows[i]["归属部门"].ToString(), @"\s", "");
                        string rylb = Regex.Replace(tb.Rows[i]["人员类别"].ToString(), @"\s", "");
                        string gwgz = Regex.Replace(tb.Rows[i]["岗位工种"].ToString(), @"\s", "");
                        gsdw = gsdwqc;

                        //验证能通过就可以的数据
                        string zgzzc = tb.Rows[i]["资格证职称"].ToString();
                        string byyx = tb.Rows[i]["毕业院校"].ToString();
                        string xl = tb.Rows[i]["学历"].ToString();
                        string tsgzzjhm = tb.Rows[i]["特殊工种证件号码"].ToString();
                        string dh = Regex.Replace(tb.Rows[i]["电话"].ToString(), @"\s", "");
                        string sj = Regex.Replace(tb.Rows[i]["手机"].ToString(), @"\s", "");
                        string bz = tb.Rows[i]["备注"].ToString();
                        DateTime sr = DateTime.Parse("1900-01-01");
                        DateTime tjdate = DateTime.Now;

                        int xh = 0;
                        try { xh = tb.Rows[i]["序号"] != null ? int.Parse(tb.Rows[i]["序号"].ToString()) : 0; }
                        catch (Exception ex) { xh = 0; }

                        DateTime byrq = DateTime.Parse("1900-01-01");
                        try { byrq = tb.Rows[i]["毕业日期"] != null ? DateTime.Parse(tb.Rows[i]["毕业日期"].ToString()) : DateTime.Parse("1900-01-01"); }
                        catch (Exception ex) { byrq = DateTime.Parse("1900-01-01"); }

                        DateTime rzrq = DateTime.Parse("1900-01-01");
                        try { rzrq = tb.Rows[i]["入职日期"] != null ? DateTime.Parse(tb.Rows[i]["入职日期"].ToString()) : DateTime.Parse("1900-01-01"); }
                        catch (Exception ex) { rzrq = DateTime.Parse("1900-01-01"); }

                        DateTime tsgzzjyxq = DateTime.Parse("1900-01-01");
                        try { tsgzzjyxq = tb.Rows[i]["特殊工种证件有效期"] != null ? DateTime.Parse(tb.Rows[i]["特殊工种证件有效期"].ToString()) : DateTime.Parse("1900-01-01"); }
                        catch (Exception ex) { tsgzzjyxq = DateTime.Parse("1900-01-01"); }

                        DateTime tsgzzjfsrq = DateTime.Parse("1900-01-01");
                        try { tsgzzjfsrq = tb.Rows[i]["特殊工种证件复审日期"] != null ? DateTime.Parse(tb.Rows[i]["特殊工种证件复审日期"].ToString()) : DateTime.Parse("1900-01-01"); }
                        catch (Exception ex) { tsgzzjfsrq = DateTime.Parse("1900-01-01"); }

                        DateTime bzrq = DateTime.Parse("1900-01-01");
                        try { bzrq = tb.Rows[i]["办证日期"] != null ? DateTime.Parse(tb.Rows[i]["办证日期"].ToString()) : DateTime.Parse("1900-01-01"); }
                        catch (Exception ex) { bzrq = DateTime.Parse("1900-01-01"); }

                        //必填项，数据开始验证
                        tempbz = YZXX(xm, xb, sfzhm, gsdwqc, gsbm, rylb, gwgz);

                        if (this.textBox2.Text.Trim() != "")
                            pathName = this.textBox2.Text.Trim();
                        pathFileName = xm + sfzhm + ".jpg";
                        FileInfo fileinfo = new FileInfo(pathName + "/" + pathFileName);

                        if (bz.Contains("已入库"))
                        {
                            //已入库的记录，目前不用处理
                        }
                        else
                        {
                            //信息验证通过，有对应照片，数据库中没有身份证方可以通过，入库
                            //判断提交的Excel表格中是不是有重复的身份证号码
                            int sfznum = tb.Select("身份证号码 = '" + sfzhm + "'").Count();
                            if (sfznum < 2)
                            {
                                //Excel中只有唯一的一条记录时
                                if (tempbz == "数据不正确")//表示验证通过
                                {
                                    //去数据库查询T_USER表，该身份证号是否存在，若身份证匹配，就进行下一条记录
                                    System.Data.DataTable dtuser = useradp.GetDataBy_sfzh(sfzhm);
                                    //去T_USER2表中去查，身份证号重，不用再次入库
                                    System.Data.DataTable dt2user = user2adp.GetDataBy_sfzh(sfzhm);

                                    if ((dtuser.Rows.Count < 1) && (dt2user.Rows.Count < 1))
                                    {
                                        //身份证无匹配信息，就新增一条记录
                                        //先做FTP上传照片文件,再获取人员编号，之后插入数据库记录
                                        int aa = Common.FileTran.SaveFile(fileinfo, pathFileName, "DBFZSPersonImg", "");
                                        if (!(aa == 0))
                                        {
                                            MessageBox.Show("FTP服务器连接失败，请检查网络连接！");
                                            commdata.WriteLogFile("\tFTP服务器连接失败，请检查网络连接！");

                                            w.Save();
                                            w.Close(Missing.Value, Missing.Value, Missing.Value);
                                            app.Workbooks.Close();

                                            app.Quit();
                                            app = null;
                                            return;
                                        }
                                        //获取人员编号，进入user2表的人员，不生成人员编号，待人员进正式库时，再生成人员编号
                                        //string rybh = commdata.getRybh(gsdwqc, gwgz);

                                        //数据通过合法的验证，可以在T_USER2表插入数据
                                        //useradp.Insert(gsdeptid, xm, xm, xh, "全局访问", xb, sr, dh, "123456", "", gsdwqc, "", "", zp, "不停用", 0, gsbmid + "", rylbid, sfzhm, rybh, tjdate, gwgzid, 200, 0, "", "卡加指纹", "-100", "", byyx, byrq, xl, rzrq, tsgzzjhm, tsgzzjyxq, tsgzzjfsrq, bzrq, sj, xfzt);
                                        user2adp.Insert(gsdeptid, rylbid, gsdwqc, gsbmid, xm, xm, null, xb, dh, sj, null, gwgzid, sfzhm, 200, tjdate, i, zp, byyx, byrq, xl, rzrq, tsgzzjhm, tsgzzjyxq, tsgzzjfsrq, bzrq, gsbmid + "", "未确认", null, null, "未审核", null, null, null, "否", -1, "进出1号门", null);

                                        //记录插入成功时，更新Excel“备注”字段提示：数据合格：已入库
                                        xSt.Cells[j + 2, 20] = "数据合格：已入库(" + DateTime.Now.GetDateTimeFormats('g')[0].ToString() + ")";//2005-11-5 14:06 

                                        //合格记录从1到21列，全部都是黄绿底，黑字
                                        Range range = app.Range[app.Cells[j + 2, 1], app.Cells[j + 2, 21]];
                                        range.Interior.ColorIndex = 35;//背景的颜色：黄绿色
                                        range.Font.ColorIndex = 1;//字的颜色：黑色

                                        //日志记录
                                        commdata.WriteLogFile("1（数据合格入库）：\t" + xm + "\t" + sfzhm + "\t" + tempbz);
                                    }
                                    else
                                    {
                                        //身份证已查到，但是备注字段没有标识“已入库”，需要去数据库中查一下，从而判断该记录是不是已操作过
                                        System.Data.DataTable szfhhasmore = useradp.GetDataBy_XM_SFZH(xm, sfzhm);
                                        System.Data.DataTable szfhhasmoreuser2 = user2adp.GetDataBy_XM_SFZH(xm, sfzhm);
                                        if ((szfhhasmore.Rows.Count == 1) || (szfhhasmoreuser2.Rows.Count == 1))
                                        {
                                            string bmmc = "";
                                            System.Data.DataTable bmdt = bmadp.GetDataBy_DEPT_id(int.Parse(szfhhasmore.Rows[0]["DEPT_id"].ToString()));

                                            //用Excel中的姓名和身份证号去数据库查，有唯一记录时，更新Excel“备注”字段提示：身份证号系统已经存在，请勿重复添加
                                            xSt.Cells[j + 2, 20] = tempbz + " 身份证号已经存在-"+bmdt.Rows[0]["BMMC"].ToString()+"，请勿重复添加(" + DateTime.Now.GetDateTimeFormats('g')[0].ToString() + ")";//2005-11-5 14:06 

                                            //不合格记录从1到21列，全部都是白底红字
                                            Range range = app.Range[app.Cells[j + 2, 1], app.Cells[j + 2, 21]];
                                            range.Interior.ColorIndex = 35;//背景的颜色：黄绿色
                                            range.Font.ColorIndex = 3;//字的颜色：红色                                              

                                            //日志记录
                                            commdata.WriteLogFile("2（身份证号已经存在-" + bmdt.Rows[0]["BMMC"].ToString() + "，请勿重复添加）：\t" + xm + "\t" + sfzhm + "\t" + tempbz);
                                        }
                                        else
                                        {
                                            //用Excel中的姓名和身份证号去数据库查，有多条记录时，更新Excel“备注”字段提示：身份证号与他人重复，请核对信息
                                            //验证未通过，有不合格数据，不合格信息写在“备注”字段内
                                            xSt.Cells[j + 2, 20] = tempbz + " 身份证号与他人重复，请核对信息并重新提交照片(" + DateTime.Now.GetDateTimeFormats('g')[0].ToString() + ")";//2005-11-5 14:06 

                                            //不合格记录从1到21列，全部都是白底红字
                                            Microsoft.Office.Interop.Excel.Range range = app.Range[app.Cells[j + 2, 1], app.Cells[j + 2, 21]];
                                            range.Interior.ColorIndex = 2;//背景的颜色：白色
                                            range.Font.ColorIndex = 3;//字的颜色：红色

                                            //日志记录
                                            commdata.WriteLogFile("3（身份证号与他人重复，请核对信息并重新提交照片）：\t" + xm + "\t" + sfzhm + "\t" + tempbz);
                                        }
                                    }
                                }
                                else
                                {
                                    //验证未通过，有不合格数据，不合格信息写在“备注”字段内
                                    xSt.Cells[j + 2, 20] = tempbz;

                                    //不合格记录从1到21列，全部都是白底红字
                                    Microsoft.Office.Interop.Excel.Range range = app.Range[app.Cells[j + 2, 1], app.Cells[j + 2, 21]];
                                    range.Interior.ColorIndex = 2;//背景的颜色：白色
                                    range.Font.ColorIndex = 3;//字的颜色：红色

                                    //日志记录
                                    commdata.WriteLogFile("4（未通过验证）：\t" + xm + "\t" + sfzhm + "\t" + tempbz);
                                }
                            }
                            else
                            {
                                //不管数据是否通过验证，都显示tempbz（验证信息）
                                //Excel中有重复的身份证记录，更新Excel文件“备注”字段内容，数据不进库
                                xSt.Cells[j + 2, 20] = tempbz + " Excel内身份证号重复（需要重新提交身份证号及照片信息）(" + DateTime.Now.GetDateTimeFormats('g')[0].ToString() + ") ";//2005-11-5 14:06 

                                //不合格记录从1到21列，全部都是白底红字
                                Range range = app.Range[app.Cells[j + 2, 1], app.Cells[j + 2, 21]];
                                range.Interior.ColorIndex = 2;//背景的颜色：白色
                                range.Font.ColorIndex = 3;//字的颜色：红色

                                //日志记录
                                commdata.WriteLogFile("5（Excel内身份证号重复（需要重新提交身份证号及照片信息））：\t" + xm + "\t" + sfzhm + "\t" + tempbz);
                            }
                        }
                    }
                    w.Save();
                    w.Close(Missing.Value, Missing.Value, Missing.Value);
                    app.Workbooks.Close();
                    //退出excel
                    app.Quit();
                    app = null;
                }
                catch (Exception ex)
                {
                    //退出excel
                    app.Quit();
                    app = null;
                }
                finally
                {
                    //退出excel
                    app = null;
                }
            }
        }

        /// <summary>
        /// Excel人员及照片验证
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button4_Click(object sender, EventArgs e)
        {
            if (this.textBox2.Text == "")
            {
                MessageBox.Show("请选择照片文件存放的目录!");
                return;
            }

            this.openFileDialog1.Filter = "*.xls|*.xls|所有文件(*.*)|*.*";
            if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                Control.CheckForIllegalCrossThreadCalls = false;

                Thread trd = new Thread(new ThreadStart(this.ThreadTask));
                trd.IsBackground = true;
                trd.Start();
            }
        }

        /// <summary>
        /// 加载Excel文件,返回DataTable
        /// </summary>
        /// <returns></returns>
        public System.Data.DataTable JZExcelFile()
        {
            if (this.textBox1.Text.Trim() != "")
            {
                try
                {
                    //返回值
                    System.Data.DataTable dt = null;
                    //获得文件名
                    string path = this.textBox1.Text.Trim().ToString();
                    //创建一个数据链接 
                    string strCon = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" + path + " ;Extended Properties='Excel 8.0;HDR=False;IMEX=1;'";
                    OleDbConnection myConn = new OleDbConnection(strCon);
                    // string strCom = " SELECT 人员编号,姓名,性别,电话,身份证号,所属部门,公司,照片,工种 FROM [Sheet1$] ";
                    string strCom = " SELECT 员工工号,姓名,性别,身份证号码,公司单位全称,归属部门,人员类别,岗位工种,资格证职称,毕业院校,毕业日期,学历,入职日期,特殊工种证件号码,特殊工种证件有效期,特殊工种证件复审日期,办证日期,电话,手机,备注,序号 FROM [Sheet1$] ";
                    myConn.Open();
                    //打开数据链接，得到一个数据集 d
                    OleDbDataAdapter myCommand = new OleDbDataAdapter(strCom, myConn);
                    //创建一个 DataSet对象 
                    DataSet myDataSet = new DataSet();
                    //得到自己的DataSet对象 
                    myCommand.Fill(myDataSet, "[Sheet1$]");

                    //关闭此数据链接 
                    myConn.Close();
                    dt = myDataSet.Tables[0];
                    return dt;
                }
                catch (Exception ex)
                {

                    MessageBox.Show("Excel文件表头字段不对！");
                    return null;
                }
            }
            else
            {
                MessageBox.Show("请先选择一个Excel文件！");
                return null;
            }
        }

        /// <summary>
        /// 验证信息
        /// </summary>
        /// <param name="xm"></param>
        /// <param name="xb"></param>
        /// <param name="sfzhm"></param>
        /// <param name="gsdwqc"></param>
        /// <param name="gsbm"></param>
        /// <param name="rylb"></param>
        /// <param name="gwgz"></param>
        /// <returns></returns>
        public string YZXX(string xm, string xb, string sfzhm, string gsdwqc, string gsbm, string rylb, string gwgz)
        {
            if (xm == null)
            {
                tempbz += " 姓名为空\t";
            }
            else
            {
                if (xm.Length < 1)
                {
                    tempbz += " 姓名不正确\t";
                }

            }

            if (xb == null)
            {
                tempbz += " 性别为空\t";
            }
            else
            {
                if ((xb != "男") && (xb != "女"))
                {
                    tempbz += " 性别不正确\t";
                }
            }

            if (sfzhm == null)
            {
                tempbz += " 身份证号码为空\t";
            }
            else
            {
                if ((sfzhm.Length != 15) && (sfzhm.Length != 18))
                {
                    tempbz += " 身份证号长度不正确\t";
                }
            }

            if (gsdwqc == null)
            {
                tempbz += " 公司单位全称为空\t";
            }
            else
            {
                if (gsdwqc.Length < 1)
                {
                    tempbz += " 公司单位全称不正确\t";
                }
                else
                {
                    //判断公司单位全称
                    System.Data.DataTable groupdt = groupadp.GetDataBy_jgname(gsdwqc);
                    if (groupdt.Rows.Count < 1)
                    {
                        tempbz += " 公司单位全称不匹配";
                    }
                    else
                    {
                        gsdwid = int.Parse(groupdt.Rows[0]["GRPUP_ID"].ToString());//获取公司单位ID
                        System.Data.DataTable bmdt = bmadp.GetDataBy_grpup_id(gsdwid);
                        gsdeptid = int.Parse(bmdt.Rows[0]["DEPT_ID"].ToString());//获取公司单位对应的部门ID
                    }
                }
            }

            if (gsbm == null)
            {
                tempbz += " 归属部门为空\t";
            }
            else
            {
                if (gsbm.Length < 1)
                {
                    tempbz += " 归属部门不正确\t";
                }
                else
                {
                    //判断归属部门
                    System.Data.DataTable gsbmdt = bmadp.GetDataBy_BMMC83(gsbm);
                    if (gsbmdt.Rows.Count < 1)
                    {
                        tempbz += " 归属部门不匹配";
                    }
                    else
                    {
                        gsbmid = int.Parse(gsbmdt.Rows[0]["DEPT_id"].ToString());//获取归属部门ID
                        if (gsbmid == -1)
                            zp = "~/admin/ftp/DBPersonImg/" + xm + sfzhm + ".jpg";//-1：设置存放正式员工存放照片路径
                        else
                            zp = "~/admin/ftp/DBFZSPersonImg/" + xm + sfzhm + ".jpg";//非-1：设置存放非正式员工照片路径
                    }
                }
            }

            if (rylb == null)
            {
                tempbz += " 人员类别为空\t";
            }
            else
            {
                if (rylb.Length < 1)
                {
                    tempbz += " 人员类别不正确\t";
                }
                else
                {
                    //判断人员类别
                    System.Data.DataTable rylbdt = usertypeadp.GetDataBy_RY_Name(rylb);
                    if (rylbdt.Rows.Count < 1)
                    {
                        tempbz += " 人员类别不匹配";
                    }
                    else
                    {
                        rylbid = int.Parse(rylbdt.Rows[0]["RY_ID"].ToString());//获取人员类别ID
                    }
                }
            }

            if (gwgz == null)
            {
                tempbz += " 岗位工种为空\t";
            }
            else
            {
                if (gwgz.Length < 1)
                {
                    tempbz += " 岗位工种不正确\t";
                }
                else
                {
                    //判断岗位工种
                    System.Data.DataTable gwgzdt = detailadp.GetDataBy_MC(gwgz);
                    if (gwgzdt.Rows.Count < 1)
                    {
                        tempbz += " 岗位工种不匹配";
                    }
                    else
                    {
                        gwgzid = int.Parse(gwgzdt.Rows[0]["DETAIL_ID"].ToString());//获取岗位工种ID
                    }
                }
            }

            //查询照片文件是否存在，存在写入照片存在，不存在提示照片不存在           
            if (this.textBox2.Text.Trim() != "")
                pathName = this.textBox2.Text.Trim() + "/";
            pathFileName = pathName + xm + sfzhm + ".jpg";

            if (!File.Exists(pathFileName))
            {
                tempbz += " 照片信息不匹配,需要重新提交照片";
            }
            return tempbz;
        }
    }
}
